package com.qiqv.config;

import com.qiqv.utils.YamlAndPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author hjr
 * @version 1.0
 * @date 2023/2/14 15:10
 */
@Component
// 由于 DefaultPropertySourceFactory 不能解析yml文件,所以这里需要指定
@PropertySource(value = "classpath:data/instrument.yml",factory = YamlAndPropertySourceFactory.class)
@ConfigurationProperties(prefix = "instrument")
public class PianoData {
    
    List<String> piano;

    public List<String> getPiano() {
        return piano;
    }

    public void setPiano(List<String> piano) {
        this.piano = piano;
    }
}
